package ro.gillardon.commons;

import ro.gillardon.commons.enums.Currency;

/**
 * Price entity which wraps around a value and a currency.
 *
 * @author davidl
 */
public class Price {

  /** The amount as double. */
  private final Double amount;

  /** The currency as enum. */
  private final Currency currency;

  /**
   * Instantiates a new Price object using fields.
   *
   * @param amount the value
   * @param currency the enum
   */
  public Price(final Double amount, final Currency currency) {
    this.amount = amount;
    this.currency = currency;
  }

  /**
   * Gets the amount.
   *
   * @return the amount
   */
  public Double getAmount() {
    return this.amount;
  }

  /**
   * Gets the currency.
   *
   * @return the currency
   */
  public Currency getCurrency() {
    return this.currency;
  }

  @Override
  public String toString() {
    return "Price [amount=" + this.amount + ", currency=" + this.currency + "]";
  }

}
